package collection;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.List;

/** 数值转换为集合*/
public class ArrayToList {
    public static void main(String[] args) {
        String[]array={"one","two","three","four","five"};
        System.out.println("array为:"+ Arrays.toString(array));
        List<String>list=Arrays.asList(array);
        System.out.println("list为:"+list);
        array[0]="six";
        System.out.println("array为:"+Arrays.toString(array));
        System.out.println("list为:"+list);
        list.set(1,"seven");
        System.out.println("array为:"+Arrays.toString(array));
        System.out.println("list为:"+list);
        list.add("123");
    }
}
